<?php

/**
 * Description of BaseModule
 *
 * @author etpasse
 */
require_rewrite(SYSTEM_PATH."database/database_mysqli.php");
class BaseModule extends Etpass_common {

    protected  $db = NULL;
    protected  $ms_db = NULL;
    
    public function __construct() {
        parent::__construct();
//        if ($this->db === NULL)
//            $this->db = DB_MySQLi::getInstance(); // 连接mysql主库和只读库
//        if ($this->ms_db === NULL)
//            $this->ms_db = mssql_connect::get(); // 连接mssql订阅库
    }

    public function functionName($param) {
        
        $arr = $this->val;
        if (!empty($arr)) {
            $_nGET = $_GET;
            $_GET = array();
            foreach ($_nGET as $key => $value) {
                $method = 'get'.$this->validate_com[$key]['type'];
                $arr[$key]['param'] = array_merge(array('key' => $value), $arr[$key]['param']);
                $_GET[$key] = call_user_func(array($this, $method), $arr[$key]['param']);
            }
        }
    }

    public function getint($param) {
        
        return intval($param['key']);
    }

    public function getString($key, $len) {

        return $key;
    }

}

?>
